package oop_po2;

import java.awt.Image;
import java.awt.MediaTracker;
import javax.swing.ImageIcon;

public class OOP_PO2_Test {

    public Image getImage(String path){
        ImageIcon plaatje = new ImageIcon("images/"+path);
                
        Image image = plaatje.getImage();
        
        return image;
    }

    public static void main(String args[]){
        OOP_PO2_Test app = new OOP_PO2_Test();
        Image image = app.getImage("lol.png"); // TODO OOP_PO2_A2: Fill in the path to an existing image
        if(image != null && image instanceof Image){
                System.out.println("Successfully loaded the image file.");
        }
        else{
            System.out.println("Nothing loaded. Try again.");
        }
    }
}
